home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Software of the Month Club / Amiga Latest & Greatest Volume 226 (1995)(SOMC)(Disk 2 of y)[SMCxxxC30Ix].zip / Amiga Latest & Greatest Volume 226 (1995)(SOMC)(Disk 2 of y)[SMCxxxC30Ix].adf / BlocNotes / scroller.rexx < prev    next >
OS/2 REXX Batch file  |  1996-02-09  |  2KB  |  77 lines

  1. /*Scroller.rexx v3.6*/
  2. IF POS('blocnotes.rexx' , SHOW('Ports'))=0 THEN do
  3.    say "Sorry, I need Blocnotes. Run it first"
  4.    exit
  5. end
  6.  
  7. address 'blocnotes.rexx'
  8. options results
  9.  
  10. /******************************************************************
  11.  Adjust these variables to fit in your system.
  12. ******************************************************************/
  13.  
  14. FName="LetterGothic.font"          /*Font to use*/
  15. FSize=60                           /*Size of the font*/
  16. /*****************************************************************/
  17.  
  18.  
  19. GETSCREENDATA
  20. parse VAR result . . ScrW ScrH .
  21.  
  22. WW=FSize*5
  23. WH=FSize+5
  24. Speed=3
  25.  
  26. forever=0
  27.  
  28. if words(Arg(1))<2 then do
  29.    if Arg(1)='?' then do
  30.       say 'USAGE: rx Scroller <times> <string>'
  31.       say 'Maximum length is 70 chars.'
  32.    end
  33.    times=3
  34.    string='USAGE: rx Scroller.rexx <times> <string>.Press a key.'
  35. end
  36. else do
  37.    times=word(arg(1),1)
  38.    if times=0 then forever=1
  39.    if (times=0)|(times>40) then times=2
  40.  
  41.    p=POS(' ',Arg(1))
  42.    string=RIGHT(Arg(1),LENGTH(Arg(1))-p)
  43.    if LENGTH(string)>70 then do
  44.       string=left(string,70);
  45.    end
  46. end
  47.  
  48. OPEN TRUNC(ScrW-WW)/2 TRUNC((ScrH-WH)/3) WW WH FONTNAME FName FONTSIZE FSize NOSAVE NOGADGET NOEDIT NOSCROLLER SCREEN 'Workbench'
  49. id=result
  50.  
  51. SETINSTIME Speed
  52. WORDWRAP id OFF
  53. INHIBIT id ON
  54. ONCLICK EXIT
  55. AA=0
  56.  
  57. do i=0 to times-1
  58.    CLEAR id
  59.    GO id 1 0
  60.    GO id 10 0
  61.    PRINT id '        '
  62.    if AA=0 then do
  63.       SHOW id
  64.       AA=1
  65.    end
  66.    WASCLICKED id
  67.    if result='1' then break
  68.    PRINT id string
  69.    WASCLICKED id
  70.    if result='1' then break
  71.    PRINT id '           '
  72.    WASCLICKED id
  73.    if result='1' then break
  74.    if forever=1 then i=0
  75. end
  76. CLOSE id
  77.